Learn Microservices with Spring Boot by Moisés Macero García

Learn Microservices with Spring Boot by Moisés Macero García

Author:Moisés Macero García
Language: eng
Format: epub
ISBN: 9781484261316
Publisher: Apress


API Exposure

We created a REST endpoint in the Gamification microservice that was intended for the Multiplication microservice. But the UI also needs access to the Gamification microservice so, in fact, anybody could access it. Smart users could send fake data to the Gamification microservice if they use an HTTP client (like HTTPie). We would be in a bad situation since that would break our data integrity. Users could score points and get badges without the corresponding attempts stored on the Multiplication side.

There are multiple ways of solving this problem. We could think of adding a security layer to our endpoints and make sure that internal APIs are available only for other back-end services. A simpler option is to use a reverse proxy (with the Gateway pattern) to make sure that we expose only the public endpoints. We’ll cover this option in more detail in Chapter 8.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.